Developer Documentation

QuickTime 4 API Documentation

QuickTime 4 Reference

| Previous | Chapter Contents | Chapter Top |

Management of Progressive Downloads

This section describes a function for progressive downloads. These functions apply to all derived media handler components.

MediaMakeMediaTimeTable

When an application or other software calls any of the Movie Toolbox's functions to create a time table for progressive downloads, the base media handler calls your derived media handler's MediaMakeMediaTimeTable function to create the time table.

pascal ComponentResult MediaMakeMediaTimeTable (
                     MediaHandler mh,
                     long **offsets,
                     TimeValue startTime,
                     TimeValue endTime,
                     TimeValue timeIncrement,
                     short firstDataRefIndex,
                     short lastDataRefIndex,
                     long *RetDataRefSkew);
mh
Specifies the media handler to create the time table.

offsets
A handle to an unlocked relocatable memory block that is allocated by an application or other software when it calls the toolbox's QTMovieNeedsTimeTable , GetMaxLoadedTimeInMovie , MakeTrackTimeTable , or MakeMediaTimeTable function. Your derived media handler returns the time table for the media in this block. Your media handler has to resize the handle.

startTime
Specifies the first point of the media to be included in the time table. This time value is expressed in the media's time coordinate system.

endTime
Specifies the last point of the media to be included in the time table. This time value is expressed in the media's time coordinate system.

timeIncrement
The resolution of the time table. The values in a time table are for a points in the media, and these points are separated by the amount of time specified by this parameter. The time value is expressed in the media's time coordinate system.

firstDataRefIndex
Specifies the first in the range of data reference indexes you are querying.

lastDataRefIndex
Specifies the last in the range of data reference indexes you are querying.

RetDataRefSkew
Contains a pointer to the number of entries, i.e., the number of entries in the offset table per data reference.

DISCUSSION

The toolbox calls your derived media handler's MediaMakeMediaTimeTable function whenever an application or other software calls the toolbox's QTMovieNeedsTimeTable , GetMaxLoadedTimeInMovie , MakeTrackTimeTable, or MakeMediaTimeTable function. When an application or other software calls one of these functions, it allocates an unlocked relocatable memory block for the time table to be returned and passes a handle to it in the offsets parameter. Your derived media handler must resize the block to accommodate the time table it returns.

The time table your derived media handler returns is a two-dimensional array of long integers that is organized as follows:

The number of columns in the table must be equal to ( endTime - startTime ) / timeIncrement , rounded up.

Your derived media handler must also return the offset to the next row of the time table, in long integers, in the retdataRefSkew parameter. Because of alignment issues, this value is not always equal to ( endTime - startTime ) / timeIncrement , rounded up.


© 1999 Apple Computer, Inc.

| Previous | Chapter Contents | Chapter Top |